pp108 : JMX Functionality in WS-AppServer

JMX Functionality in WS-AppServer

This topic contains information on the JMX functionality in WS-AppServer.


The JMX functionality in WS-AppServer helps System Administrators to remotely monitor the WS-AppServer Service configuration and various managed components of different WS-AppServer-based applications. One of the key performance counters provided by JMX in WS-AppServer is the number of active transactions that can be monitored.

This functionality can be used in two types of applications:

  • WS-AppServer applications
  • Applications that use WS-AppServer in embedded mode

In WS-AppServer Applications


WS-AppServer, by default, creates a sub-component called 'Applications'. A new managed component can be created under 'Applications' and its configuration can be defined by the developer. You can create as many managed components as required for that application.
To achieve this, use the following method in the BsfConnector class:

public IManagedComponent createManagedApplicationComponent(String type, String description, Object componentImpl)

When the components are created, the JMX console tree appears similar to the sample shown below:

WS-AppServer managed component
          ->WS-AppServerConnectionPool component
                 ->Applications component
                           ->FirstApplication (Created by the application developer)
                           ->SecondApplication (Created by the application developer)

The actual console would appear as shown in the figure below:
For more details on using the method, see WS-AppServer SDK.

In Applications Using WS-AppServer in Embedded Mode


If WS-AppServer is being used in embedded-mode by any other application connector code, then a managed sub-component for WS-AppServer can be created in embedded mode and specified in the WS-AppServer configuration. This arrangement exposes the JMX functionality of WS-AppServer to the management console through the application connector that embeds WS-AppServer. Additionally, a name for the DBConnectionpool can be specified so that WS-AppServer can create a connection pool component with that name under the existing managed sub-component.
To achieve this, use the following constructor in the
Config class:

Config(IManagedComponent wsAppServerManagedComponent, String connectionPoolName, int iConfig, boolean setProperties)

When the connection pool component is created, the JMX console tree appears similar to the sample shown below:

Any application connector managed component
        ->WS-AppServer managed sub-component
                    ->Connection pool component


The actual console would appear as shown in the figure below: